home *** CD-ROM | disk | FTP | other *** search
/ ftp.cs.arizona.edu / ftp.cs.arizona.edu.tar / ftp.cs.arizona.edu / icon / newsgrp / group01b.txt / 000060_icon-group-sender_Tue Mar 20 17:11:34 2001.msg < prev    next >
Internet Message Format  |  2002-01-03  |  2KB

  1. Return-Path: <icon-group-sender>
  2. Received: (from root@localhost)
  3.     by baskerville.CS.Arizona.EDU (8.11.1/8.11.1) id f2L0BOo05653
  4.     for icon-group-addresses; Tue, 20 Mar 2001 17:11:24 -0700 (MST)
  5. Message-Id: <200103210011.f2L0BOo05653@baskerville.CS.Arizona.EDU>
  6. Date: Tue, 20 Mar 2001 18:05:20 -0500
  7. From: "Steve Graham" <Steve_Graham@labcorp.com>
  8. To: <icon-group@cs.arizona.edu>
  9. Subject: Einstein's Riddle
  10. Content-Disposition: inline
  11. X-MIME-Autoconverted: from quoted-printable to 8bit by baskerville.CS.Arizona.EDU id f2KN5f803888
  12. Errors-To: icon-group-errors@cs.arizona.edu
  13. Status: RO
  14. Content-Length: 1483
  15.  
  16. My company originally posted this puzzle on an inhouse newsletter aimed at the MicroFocus COBOL programming staff.  While I never saw a COBOL solution, I would be interested in an Icon/SNOBOL4/SPITBOL version.  I would think that this kind of puzzle would be inherently easy in Icon, et al considering its backtracking mechanism.
  17.  
  18.  
  19. Steve
  20.  
  21. ===
  22.  
  23. Einstein's Riddle
  24.  
  25. Albert Einstein wrote this riddle this century [ed. 20th century].  He said
  26. 98% of the world could not solve it.
  27.  
  28. There are 5 houses in 5 different colors.  In each house lives a person
  29. with a different nationality.  The 5 owners drink a certain type of
  30. beverage, smoke a certain brand of cigar, and keep a certain pet.  No owners
  31. have the same pet, smoke the same brand of cigar or drink the same
  32. beverage.
  33.  
  34. The question is: "Who owns the fish?"
  35.  
  36. Hints:
  37.  
  38. The Brit lives in the red house.
  39. The Sweed keeps dogs as pets.
  40. The Dane drinks tea.
  41. The green house is on the left of the white house.
  42. The green house's owner drinks coffee.
  43. The person who smokes Pall Mall rears birds.
  44. The owner of the yellow house smokes Dunhill.
  45. The man living in the center house drinks milk.
  46. The Norwegian lives in the first house.
  47. The man who smokes Blends lives next to the one who keeps cats.
  48. The man who keeps the horse lives next to the man who smokes Dunhill.
  49. The owner who smokes Bluemasters drinks beer.
  50. The German smokes Prince.
  51. The Norwegian lives next to the blue house.
  52. The man who smokes Blends has a neighbor who drinks water.
  53.  
  54.